<?php
$mainMenu = $sf_user->getAttribute(Globals::SESSION_MAIN_MENU);
$subMenu = $sf_user->getAttribute(Globals::SESSION_SUB_MENU);
?>
<nav id="sidebar" class="sidebar nav-collapse collapse">
    <ul id="side-nav" class="side-nav">
        <li class="<?php if ($mainMenu == "SUMMARY") { echo "active"; }?>">
            <a href="/member/summary"><i class="icon-home"></i><span class="name"><?php echo __('Dashboard'); ?></span></a>
        </li>

        <li class="panel <?php if ($mainMenu == "FUNDS_DEPOSIT") { echo "active"; }?>" style="">
            <a class="accordion-toggle <?php if ($mainMenu != "FUNDS_DEPOSIT") { echo "collapsed"; }?>" data-toggle="collapse"
               data-parent="#side-nav" href="#forms-collapse"><i class="icon-edit"></i> <span class="name"><?php echo __('Funds Deposit'); ?></span></a>
            <ul id="forms-collapse" class="panel-collapse collapse <?php if ($mainMenu == "FUNDS_DEPOSIT") { echo "in"; }?>">
                <li class="<?php if ($subMenu == "FUNDS_DEPOSIT") { echo "active"; }?>"><a href="/member/fundsDeposit"><?php echo __('Funds Deposit'); ?></a></li>
                <li style="display: none" class="<?php if ($subMenu == "RELOAD_MT4_FUND") { echo "active"; }?>"><a href="/member/reloadTopup"><?php echo __('Reload MT4 Fund'); ?></a></li>
            </ul>
        </li>

        <li class="panel <?php if ($mainMenu == "REGISTRATION") { echo "active"; }?>">
            <a class="accordion-toggle <?php if ($mainMenu != "REGISTRATION") { echo "collapsed"; }?>" data-toggle="collapse"
               data-parent="#side-nav" href="#ui-collapse"><i class="icon-magic"></i> <span class="name"><?php echo __('Open Account'); ?></span></a>
            <ul id="ui-collapse" class="panel-collapse collapse  <?php if ($mainMenu == "REGISTRATION") { echo "in"; }?>">
                <li class="<?php if ($subMenu == "LIVE_REGISTRATION") { echo "active"; }?>"><a href="/member/liveRegistration"><?php echo __('Open Live Trading Account'); ?></a></li>
                <li class="<?php if ($subMenu == "DEMO_REGISTRATION") { echo "active"; }?>"><a href="/member/demoRegistration"><?php echo __('Open Demo Account'); ?></a></li>
            </ul>
        </li>
        <li class="panel <?php if ($mainMenu == "WITHDRAWAL") { echo "active"; }?>">
            <a class="accordion-toggle <?php if ($mainMenu != "WITHDRAWAL") { echo "collapsed"; }?>" data-toggle="collapse"
               data-parent="#side-nav" href="#components-collapse"><i class="icon-bookmark-empty"></i> <span class="name"><?php echo __('Banking Request'); ?></span></a>
            <ul id="components-collapse" class="panel-collapse collapse <?php if ($mainMenu == "WITHDRAWAL") { echo "in"; }?>">
                <li class="<?php if ($subMenu == "MT4_WITHDRAWAL") { echo "active"; }?>"><a href="<?php echo url_for("/member/mt4Withdrawal") ?>"><?php echo __('Withdrawal'); ?></a></li>
            </ul>
        </li>
    </ul>
    <div id="sidebar-settings" class="settings">
        <button type="button"
                data-value="icons"
                class="btn-icons btn btn-transparent btn-sm">Icons</button>
        <button type="button"
                data-value="auto"
                class="btn-auto btn btn-transparent btn-sm">Auto</button>
    </div>
</nav>